package net.protocol.diameter.message;

import net.protocol.diameter.dictionary.MessageFormatFactory;

import java.nio.ByteBuffer;

/**
 * <pre>
 *  Message Format
 *
 *     &lt;ASA&gt;  ::= &lt; Diameter Header: 274, PXY &gt;
 *                &lt; Session-Id &gt;
 *                { Result-Code }
 *                { Origin-Host }
 *                { Origin-Realm }
 *                [ User-Name ]
 *                [ Origin-State-Id ]
 *                [ Error-Message ]
 *                [ Error-Reporting-Host ]
 *              * [ Failed-AVP ]
 *              * [ Redirect-Host ]
 *                [ Redirect-Host-Usage ]
 *                [ Redirect-Max-Cache-Time ]
 *              * [ Proxy-Info ]
 *              * [ AVP ]
 * </pre>
 *
 * @author jinhongw@gmail.com
 */
public class DiameterAnswer extends AbstractDiameterMessage {

    public DiameterAnswer(int commandCode) {
        super(commandCode);

        this.setRequest(false);
    }

    public DiameterAnswer(byte version, int commandCode) {
        super(version, commandCode);

        this.setRequest(true);
    }

    public DiameterAnswer(MessageFormatFactory factory, ByteBuffer src) {
    	super(factory, src);
    }
}
